package com.iwhalecloud.bss.kite.cucc.service.order;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.cucc.client.api.attr.ILocalQueryDevInfoService;
import com.iwhalecloud.bss.kite.cucc.client.api.order.IQryChannelKindService;
import com.iwhalecloud.bss.kite.cucc.client.dto.attr.ChannelKindDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.inf.req.QryChannelKindReqDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.inf.rsp.ChannelKindResultObject;
import com.iwhalecloud.bss.kite.cucc.client.dto.inf.rsp.QryChannelKindRspDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QryChannelKindService implements IQryChannelKindService {
    @Autowired
    private ILocalQueryDevInfoService queryDevInfoService;

    @Override
    public QryChannelKindRspDTO qryChannelKind(QryChannelKindReqDTO kiteOrderDetailReqDTO) {
        List<ChannelKindDTO> channelKindList = queryDevInfoService.queryDevInfoChanelType();
        QryChannelKindRspDTO qryChannelKindRspDTO = new QryChannelKindRspDTO();
        ChannelKindResultObject channelKindResultObject = new ChannelKindResultObject();
        channelKindResultObject.setChannelKindReq(channelKindList);
        qryChannelKindRspDTO.setResultObject(channelKindResultObject);
        qryChannelKindRspDTO.setResultCode(KeyConsts.SUCCESS_0);
        qryChannelKindRspDTO.setResultMsg("SUCCESS");
        return qryChannelKindRspDTO;
    }
}
